<?php 
include_once('connection/connection.php');
include('header.php');
include('menu.php');
include('config.php');
$frm=$_SESSION['form_id'];
$id1=$_SESSION['id1'];
$dis_name=$_SESSION['dis_name'];
$qr="select * from tbl_dtls_critical where form_id='$frm'";
$res=mysql_query($qr);
$row=mysql_fetch_array($res);
if(isset($_POST['back']))
{ 
	header('Location: view_critical_1.php');
}	
if(isset($_POST['submit']))
{ 
	echo'<span class="successmssg">You have successfully view this Form. Now you can go on <a href="home.php">home</a> page.</span>';
	exit();
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="css/style_question.css" type="text/css" rel="stylesheet" />
<title>View Q1</title></head>
<script language=javascript>
function show_NF()
{
	var val=document.getElementById('num').value;
	for(i=1; i<val; i++)
	{
		//alert(document.getElementById('critical'+i).innerHTML);
		if(document.getElementById('critical'+i).innerHTML == "no")
		{
			document.getElementById('crit'+i).style.display = "none";
		}
		else
		{
			document.getElementById('crit'+i).style.display = "block";
		}
		
	}
}
</script>
</head>
<body onLoad="show_NF()">
<div align="center">
<form name="f1" action="" method="post">
	<table border="0" width="750" id="table1" cellspacing="0" cellpadding="0">
		<tr>
			<td height="30" colspan="3">
			<p align="center">
			<font face="Verdana" style="font-size: 10pt; font-weight: 700" color="#000000">
			Critical Village </font></td>
		</tr>		
		<tr>
			<td colspan="3" align="center"><font face="Arial" style="font-size: 8.5pt" color="#000000">(For PHED Officials</font></td>
		</tr>
		<tr>
			<td colspan="3"align="center"><font face="Arial" style="font-size: 8.5pt" color="#000000">page 2</font></td>
		</tr>
		<tr>
			<td><span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#000000">&nbsp;&nbsp;Form Id = <?php echo $frm?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;District Name = <?php echo $dis_name?></font></span></td>
		</tr>
		<tr><td>&nbsp;</td></tr>
		<tr>
			<td height="22" colspan="2" bgcolor="#EEEEEE"><font color="#000000">&nbsp;
			<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt">Critical Habitations</font></span>
			</font></td>
		</tr>
		<tr>
			<td colspan="2">
				<table border="1" width="760" id="table2" bgcolor="#FDF9EE" cellspacing="1" cellpadding="0" style="border-collapse:collapse; border-color:#99CCCC;">
					<tr>
						<!--<td colspan="5">
							<span style="font-size: 4pt">&nbsp;</span>
						</td>-->
						<td width="175" height="28" align="center"  bgcolor="#F7E6B7">
							<font face="Verdana" style="font-size: 8.5pt" color="#990000">
							Average Rain Fall (mm)</font></td>
						<td width="165" align="center"  bgcolor="#F7E6B7"><font face="Verdana" style="font-size: 8.5pt" color="#990000">Ancient Pond Existing Nos.</font></td>
						<td width="192"  bgcolor="#F7E6B7" align="center"><font face="Verdana" style="font-size: 8.5pt" color="#990000"> Drainage System and Reuse of Waste Water</font></td>
						<td width="213"  bgcolor="#F7E6B7" align="center">
							<font face="Verdana" style="font-size: 8.5pt" color="#990000">
							Water Level Fluctuation(m)</font></td>
					</tr>
					
				<tr align="center">
				  <td width="175" height="26"><label id="critical_hname"><font face="Arial" style="font-size: 8.5pt">&nbsp;<?php echo "$row[avg_rain]";?></font></label></td>
			      <td align="center" width="165"><label id="type_habit"><font face="Arial" style="font-size: 8.5pt">&nbsp;<?php echo "$row[pond]";?></font></label></td>
			      <td width="192"><label id="type_habit"><font face="Arial" style="font-size: 8.5pt">&nbsp;<?php echo "$row[drainage]";?></font></label></td>
			      <td width="213"><label id="critical<?php echo $i ?>" for="<?php echo "$row[critical]";?>"><font face="Arial" style="font-size: 8.5pt">&nbsp;<?php echo "$row[water_level]";?></font></label></td>
				</tr> 
					
				
					
			</table>		</td>
	</tr>
		<tr><td>&nbsp;</td></tr>
		
		<tr>
			<td height="22" colspan="2" bgcolor="#EEEEEE"><font color="#000000">&nbsp;
			<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt">Critical Habitations</font></span>
			</font></td>
		</tr>
		<tr>
			<td colspan="2">
				<table border="1" width="758" id="table2" bgcolor="#FDF9EE" cellspacing="1" cellpadding="0" style="border-collapse:collapse; border-color:#99CCCC;">
					<tr>
						<!--<td colspan="5">
							<span style="font-size: 4pt">&nbsp;</span>
						</td>-->
						<td width="174" height="28" align="center"  bgcolor="#F7E6B7">
							<font face="Verdana" style="font-size: 8.5pt" color="#990000">
							Source Type (Functional & Repairable only)</font></td>
						<td width="167" align="center"  bgcolor="#F7E6B7"><font face="Verdana" style="font-size: 8.5pt" color="#990000">Total Nos.</font></td>
						<td width="191"  bgcolor="#F7E6B7" align="center"><font face="Verdana" style="font-size: 8.5pt" color="#990000">Potable Nos.</font></td>
						<td width="211"  bgcolor="#F7E6B7" align="center">
							<font face="Verdana" style="font-size: 8.5pt" color="#990000">
							Average Yield</font></td>
					</tr>
				
				    <tr align="center">
				      <td height="26"  bgcolor="#F7E6B7"><font face="Verdana" style="font-size: 8.5pt" color="#990000">HP</font></td>
				      <td align="center"><label id="critical"><font face="Arial" style="font-size: 8.5pt"><?php echo "$row[hp_total]";?></font></label></td>
				      <td><label id="critical"><font face="Arial" style="font-size: 8.5pt"><?php echo "$row[hp_potable]";?></font></label></td>
				      <td><label id="critical"><font face="Arial" style="font-size: 8.5pt"><?php echo "$row[hp_yield]";?>&nbsp;KLD</font></label></td>
			      </tr>
			      <tr align="center">
				  <td width="174" height="26"  bgcolor="#F7E6B7"><font face="Verdana" style="font-size: 8.5pt" color="#990000">TW</font></td>
				    <td align="center" width="167"><label id="type_habit"><font face="Arial" style="font-size: 8.5pt"><?php echo "$row[tw_total]";?></font></label></td>
				    <td width="191"><label id="type_habit"><font face="Arial" style="font-size: 8.5pt"><?php echo "$row[tw_potable]";?></font></label></td>
				    <td width="211"><label id="critical"><font face="Arial" style="font-size: 8.5pt">&nbsp;<?php echo "$row[tw_yield]";?>&nbsp;KLH</font></label></td>
				</tr> 
			</table>		</td>
	</tr>
		<tr>
			<td height="19" colspan="2"><span style="font-size: 4pt">&nbsp;</span></td>
		</tr>
		<tr>
			<td width="207" height="23"  colspan="2" bgcolor="#EEEEEE"><font color="#000000">&nbsp;
				<span style="font-weight: 700">
				<font face="Arial" style="font-size: 8.5pt">Water Supply by Tankers</font></span></font></td>
		</tr>
		
		<tr>
			<td colspan="2">
				
							
                           		 <table border="1" width="760" style="border-collapse:collapse; border-color:#99CCCC;">
                               	 <tr>
									<td width="176" height="29" align="center"  bgcolor="#F7E6B7">
										<font face="Verdana" style="font-size: 8.5pt" color="#990000">
										Type</font></td>
										<td width="256" align="center"  bgcolor="#F7E6B7"><font face="Verdana" style="font-size: 8.5pt" color="#990000">No.</font></td>
									<td width="306"  bgcolor="#F7E6B7" align="center">
										<address>
										<span style="font-style: normal">
										<font face="Verdana" style="font-size: 8.5pt" color="#990000">
										Area (m2)</font></span>
								   </address>								  </td>
								   </tr>
				                 <tr align="center">
				                   <td height="30"  bgcolor="#F7E6B7"><font face="Verdana" style="font-size: 8.5pt" color="#990000">Private Building</font></td>
				                   <td align="center"><label id="critical"><font face="Arial" style="font-size: 8.5pt">&nbsp;<?php echo "$row[pvt_no]";?></font></label></td>
				                   <td><label id="critical"><font face="Arial" style="font-size: 8.5pt">&nbsp;<?php echo "$row[pvt_area]";?></font></label></td>
				                   </tr>
				                 <tr align="center">
								  <td height="30"  bgcolor="#F7E6B7"><font face="Verdana" style="font-size: 8.5pt" color="#990000">Govt. / Public Building</font></td>
								  <td align="center"><label id="critical"><font face="Arial" style="font-size: 8.5pt">&nbsp;<?php echo "$row[govt_no]";?></font></label></td>
								  <td><label id="critical"><font face="Arial" style="font-size: 8.5pt">&nbsp;<?php echo "$row[govt_area]";?></font></label></td>
								  </tr>
								<tr align="center">
								  <td width="176" height="30"  bgcolor="#F7E6B7"><font face="Verdana" style="font-size: 8.5pt" color="#990000">Remarks (If any)</font></td>
                                  <td colspan="2" align="center"><label id="type_habit"><font face="Arial" style="font-size: 8.5pt">&nbsp;<?php echo "$row[remark]";?></font></label> </td>
                                  </tr>
			  </table>
					
	</tr>
	
	<tr>
		<td colspan="2">
			<table border="0" width="100%" id="table4" cellspacing="1" cellpadding="0" bgcolor="#FDF9EE" style="border-collapse:collapse; border-color:#99CCCC;">
			
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="0" align="center">
		<input type="submit" value="Back" name="back" style="font-size: 8pt;font-family:Verdana; border-style: solid; border-width: 1px">&nbsp;&nbsp;
			<input type="submit" value="Next" name="submit" style="font-size: 8pt;font-family:Verdana; border-style: solid; border-width: 1px">		</td>
	</tr>
</table>
</form>
</div>
</body>
</html>